export class httpClient {
    baseUrl: string = '/api'
    get(url: string,) {
        return fetch(this.baseUrl + url, {
            method: 'GET',
        })
    }
    post(url: string, data: any) {
        return fetch(this.baseUrl + url, {
            method: 'POST',
            body: JSON.stringify(data),
        })
    }
    put(url: string, data: any) {
        return fetch(this.baseUrl + url, {
            method: 'PUT',
            body: JSON.stringify(data),
        })
    }
    delete(url: string) {
        return fetch(this.baseUrl + url, {
            method: 'DELETE',
        })
    }
}